﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Shapes;
using System.Windows.Media;
using System.Windows;
using System.Windows.Controls;

namespace DiagramCreator.Nodes
{
    class StartNode : GenericNode
    {
        #region - Konstruktor -

        public StartNode()
        {
            Ellipse circle = new Ellipse();
            circle.Margin = new System.Windows.Thickness(10.0);
            circle.StrokeThickness = 1.0;
            circle.Stroke = Brushes.Black;
            circle.Fill = Brushes.Black;            
            ShapeGrid.Children.Add(circle);                        
            this.Shape = circle;
            NodeTextField.IsEnabled = false;
            NodeTextField.Visibility = Visibility.Hidden;
            NodeTextField.Text = "";
            IsSizeable = false;
            CanHaveMultipleChildren = false;
        }

        #endregion


        public override Point GetCrossingPoint(Point from)
        {
            return new Point(Left + this.ActualWidth / 2.0 - 3.0,
                Top + this.ActualHeight / 2.0);
        }
    }
}
